package com.haruhi.bot.service;

import com.haruhi.bot.job.thread.ExecuteCMDThread;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

import java.util.ArrayList;
import java.util.List;

@Component
@Slf4j
public class BotManage {

    public void startBot(){
        log.info("开始启动bot");
        List<String> commands = new ArrayList<>();
        commands.add("/bin/sh");
        commands.add("-c");
        commands.add("sh /home/bot/jar/startbot.sh");
        ExecuteCMDThread.threadPool.submit(new ExecuteCMDThread.task(commands));


    }
}
